package es.uc3m.tutorial.components.general;

import java.util.ArrayList;
import java.util.List;

import javax.faces.component.UIComponent;

public class SigameResourcesTable extends SigameDataTable {	
	
	public SigameResourcesTable() {
		super();
	}
	
	@Override
	public UIComponent paint() {								
		
		List<String> header = new ArrayList<String>();
		header.add("Nombre");
		header.add("Tipo");		
		super.setHeaderLabels(header);
		
		List<String> items = new ArrayList<String>();
		items.add("nombre");
		items.add("baseType.termino");
		super.setDataBeanItems(items);
		
		List<Boolean> title = new ArrayList<Boolean>();
		title.add(Boolean.TRUE);		
		title.add(Boolean.TRUE);
		super.setDataAsCellTitle(title);						
		
		List<Boolean> sort = new ArrayList<Boolean>();
		sort.add(Boolean.TRUE);		
		sort.add(Boolean.TRUE);
		super.setSortable(sort);
				
		super.setInitialSortColumnId(1);
		super.setInitialSortType(SigameDataTable.SORT_ASDENDING);
		
		return super.paint();
	}

}
